package com.jwater.core.manager.master.choose;

import com.jwater.core.manager.common.model.JobInfo;
import com.jwater.core.manager.common.model.NodeInfo;
import com.jwater.core.manager.common.model.WorkerInfo;

/**
 * @description:主机选择
 * @author: jnner
 * @createDate: 2021/2/5
 * @version: 1.0
 */
public interface ChooseHost {
    /**
     * 选择工作进程主机
     *
     * @param oldHost
     * @param workerInfo
     * @param index
     * @return
     */
    public NodeInfo choose(String oldHost, WorkerInfo workerInfo, int index);

    /**
     * 选择定时任务主机
     *
     * @param oldHost
     * @param jobInfo
     * @return
     */
    public NodeInfo choose(String oldHost, JobInfo jobInfo);
}
